<template>
  <div>
    app
    <h2>name:{{ $store.state.user.name }}</h2>
    <h2>age:{{ $store.state.user.age }}</h2>
    <h2>skill:{{ $store.state.user.skill }}</h2>
    <!-- 对象[属性名] -->
    <h2>isAdult:{{ $store.getters['user/isAdult'] }}</h2>
    <button @click="$store.commit('user/setSKill', 'rap')">同步修改</button>
    <button @click="$store.dispatch('user/setNameAsync', 'rose')">
      异步修改
    </button>
  </div>
</template>

<script>
export default {
  created () {
    console.log(this.$store)
  }
}
</script>

<style></style>
